#include <iostream> 
using namespace std;
class Circle
{
public:
	double r;
	virtual void show() = 0;
	Circle(double rr)
		:r(rr)
	{}
};
class Area :public Circle
{
public:
	void show()
	{
		cout << "area=" << Circle::r * Circle::r * 3.14 << endl;
	}
	Area(double rr)
		:Circle(rr)
	{}
};
class Perimeter :public Circle
{
public:
	void show()
	{
		cout << "Perimeter=" << Circle::r * 2 * 3.14 << endl;
	}
	Perimeter(double rr)
		:Circle(rr)
	{}
};
int main()
{
	double r1, r2;
	cin >> r1 >> r2;
	Circle* p;
	Area a(r1);
	p = &a;
	p->show();
	Perimeter per(r2);
	p = &per;
	p->show();
	return 0;
}